// 开发环境配置
export let baseUrl;
export let version;
export let baseHotelUrl;
export let baseMoreUrl;

// #ifndef MP-WEIXIN
if (process.env.NODE_ENV === 'development') {
  baseUrl = import.meta.env.SHOPRO_DEV_BASE_URL;
  baseHotelUrl = import.meta.env.SHOPRO_HOTEL_DEV_BASE_URL;
  baseMoreUrl = import.meta.env.SHOPRO_MORE_DEV_URL;
} else {
  baseUrl = import.meta.env.SHOPRO_BASE_URL;
  baseHotelUrl = import.meta.env.SHOPRO_HOTEL_BASE_URL;
  baseMoreUrl = import.meta.env.SHOPRO_MORE_BASE_URL;
}
// #endif

// #ifdef MP-WEIXIN
const {miniProgram} = uni.getAccountInfoSync();
if(miniProgram.envVersion == 'release'){
	baseUrl = import.meta.env.SHOPRO_BASE_URL;
	baseHotelUrl = import.meta.env.SHOPRO_HOTEL_BASE_URL;
	baseMoreUrl = import.meta.env.SHOPRO_MORE_BASE_URL;
}else{
	baseUrl = import.meta.env.SHOPRO_DEV_BASE_URL;
	baseHotelUrl = import.meta.env.SHOPRO_HOTEL_DEV_BASE_URL;
	baseMoreUrl = import.meta.env.SHOPRO_MORE_DEV_URL;
}
// #endif

version = import.meta.env.SHOPRO_VERSION;
console.log(`[Shopro ${version}]  https://www.sheepjs.com/`);
export const apiPath = import.meta.env.SHOPRO_API_PATH;

export const staticUrl = import.meta.env.SHOPRO_STATIC_URL;
export const ygbStaticUrl = import.meta.env.SHOPRO_YGB_STATIC_URL;

export const tokenName = import.meta.env.SHOPRO_TOKEN_NAME;

export const udidName = import.meta.env.SHOPRO_UDID_NAME;

export const project = import.meta.env.SHOPRO_PROJECT;

export default {
  baseUrl,
  baseMoreUrl,
  apiPath,
  staticUrl,
  ygbStaticUrl,
  baseHotelUrl,
  tokenName,
  udidName,
  project
};
